<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>海南热带农业信息网站管理平台</TITLE></HEAD>
<script language="javascript" src="jquery.js"></script>
<style type="text/css">
<!--
* { 
	margin:0px; 
	padding:0px;
}
html, body{	
	height:100%;
	overflow: hidden;

}
html>body{		/*-- for !IE6.0 --*/
	width: auto;
	height: auto;
	position: absolute;
	top: 0px;
	left: 0px;
	right: 0px;
	bottom: 0px;
	
}
body {
	border:8px solid #ffffff;
	background-color: #ffffff;min-width:230px;
}
#mainDiv {
	width: 100%;
	height: 100%;
    padding:60px 0px 25px 0px;;
	
	
}
#centerDiv{
	width: 100%;
	height: 100%;
	background-color:#00CCFF;
	padding-left:158px;
}
#mainDiv>#centerDiv{		/*-- for !IE6.0 --*/	
	width: auto;
	height: auto;
	position: absolute;
	top: 56px;
	left: 0px;
	right: 0px;
	bottom: 20px;
	
}
#left{
width:158px;
height:100%;
background:url(slide.jpg) repeat-y;
position:absolute;
left:0px;
}
#lhead{
background:url(left-head.jpg) left top no-repeat;
height:25px;
	font-size:14px;
	color:#FF9933;
    text-align:center;
	line-height:25px;
}
#right{
width:100%;
height:100%;
background:#ffffff;
position:absolute;
overflow-y:auto;
border:1px #003366 solid;
padding:20px 0 0 10px;
font-size:12px;
}
#centerDiv>#right{
width:auto;
height:auto;
position:absolute;
top:0px;
right:0px;
left:158px;
bottom:0px;
}
#topDiv{
	width:100%;
	height:56px;

	background:url(images/head-bg.jpg) repeat-x;
	position:absolute;
	top:0px;
	overflow:hidden;
}
#topDiv ul{
list-style:none;
font-size:12px;

width:100%;
margin:0;
padding:0;
}
#topDiv ul li{
float:left;
width:15%
}
#topDiv ul li a {
display:block;
width:100%;
height:25px;
line-height:25px;
background:url(images/menu-bg.jpg) repeat-x;
color:#FFFFFF;
direction:none;
text-align:center;
border-bottom:1px #000066 solid;
border:1px #06597D solid;
}
#tmenu{
width:100%;
position:absolute;
left:12%;
bottom:0;
padding-left:15%;
margin-left:-15%;
}
#current{
background:#ccc;
height:25px;
line-height:25px;
margin:-20px 0 0 -10;
overflow:hidden;
}
#bottomDiv{
	width:100%;
	height:20px;
	background:url(images/bottom.jpg) repeat-x;
	position:absolute;
	bottom:0px;
	bottom:-1px;		 /*-- for IE6.0 --*/
}
#left ul{
list-style:none;
font-size:12px;
margin:50px 0 0 8px;
}
#left ul li a{
display:block;
width:140px;
height:25px;
line-height:25px;
background:url(images/menu-bg.jpg) repeat-x;
color:#FFFFFF;
direction:none;
text-align:center;
border-bottom:1px #000066 solid;
border:1px #06597D solid;
}
#left ul li a:hover{

background:url(images/menu-bg.jpg) 0px 25px;
color:#99FFCC;
direction:none;
text-align:center;
border-bottom:1px #000066 solid;
}
#form{
width:80%;
height:99%;
margin:0 auto;
_margin-left:20%;

}
fieldset{
width:100%;
margin:20 auto;
line-height:35px;
padding-left:20PX;
}
-->
</style>

<div id="mainDiv">
	<div id="topDiv">
	<div id="tmenu"><ul>
	<li ><a href="http://www.865171.cn/">xxxxxxxxxx</a></li>
	<li ><a href="http://www.865171.cn/admin-templates">xxxxxxxxxxxxxx</a></li>
	<li ><a href="http://www.865171.cn/admin-templates">xxxxxxxxxxxxxx</a></li>
	<li ><a href="http://www.865171.cn/admin-templates">xxxxxxxxxxxxxx</a></li>
	<li ><a href="http://www.865171.cn/admin-templates">xxxxxxxxxxxxxx</a></li>
	</ul></div></div>
	<div id="centerDiv">
	
	<div id="left">
	<div id="lhead">xxxxxxxxxxxxxx</div>
	<ul>
	<li ><a href="http://www.865171.cn/admin-templates">xxxxxxxxxxxxxx  1</a></li>
	<li ><a href="http://www.865171.cn/admin-templates">xxxxxxxxxxxxxx  2</a></li>
	<li ><a href="http://www.865171.cn/admin-templates">xxxxxxxxxxxxxx  3</a></li>
	<li ><a href="http://www.865171.cn/admin-templates">xxxxxxxxxxxxxx  4</a></li>
	<li ><a href="http://www.865171.cn/admin-templates">xxxxxxxxxxxxxx  5</a></li>
	<li ><a href="http://www.865171.cn/admin-templates">xxxxxxxxxxxxxx  6</a></li>
	</ul>
	</div>
	<div id="right"> 
	<div id="current"><span class="STYLE1">登陆成功,欢迎您,<?php echo $_SESSION["auser"];?></span></div>
<div id="form">
    
    
    

  <p>
    <?php require_once('../Connections/agriculture.php'); ?>
    
      <?php
if($_SESSION["auser"]!=""){
 $user=$_SESSION["auser"];
 }else{
 $user=$_POST["user"];
 }
 
$pass=$_POST["pass"];


mysql_select_db($database_agriculture, $agriculture);
$query_Recordset1 = "SELECT * FROM user WHERE user_name = '".$user."'";
$Recordset1 = mysql_query($query_Recordset1, $agriculture) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

if($_SESSION["auser"]!=""){
	doTable($row_Recordset1);
}elseif($pass!=""){
    if($pass==$row_Recordset1["user_pass"]){
    session_start();
    $_SESSION["auser"]=$user;
    doTable($row_Recordset1);
    }else{
    	echo '<script language="javascript">alert("账号或密码错误,请重新登陆!")</script>';
		echo '<meta http-equiv="refresh" content="0;url=index.php">';
		exit();	
    }
}else{
echo '<meta http-equiv="refresh" content="1;url=index.php">您无法查看该页,请登陆!';
}

?>
    
      <?php 
function doTable($row_Recordset1){;?>
      <style type="text/css">
<!--
.STYLE1 {font-size: 14px}
-->
    </style>
  </p>
  <p>&nbsp;</p>
  <table width="800" height="304" border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="3"><div align="center" class="STYLE1">账户信息</div></td>
  </tr>
  <tr>
    <td width="134" height="40"><div align="center" class="STYLE1"><a href="edit.php?type=user_pass">修改密码</a></div></td>
    <td width="366" rowspan="5"><p class="STYLE1">ID:<?php echo $row_Recordset1['user_id']+1; ?></p>
      <p class="STYLE1">账号:<?php echo $row_Recordset1['user_name']; ?></p>
      <p class="STYLE1">密码:****</p>
      <p class="STYLE1">邮箱:<?php echo $row_Recordset1['user_email']; ?></p>
    <p class="STYLE1">电话:<?php echo $row_Recordset1['user_tel']; ?></p>
    <p class="STYLE1">注册时间:<?php echo $row_Recordset1['user_regtime']; ?></p></td>
    <td width="366" rowspan="3"><div align="center"><img src="<?php echo $row_Recordset1['user_photo']; ?>" alt="" width="128" height="128" /></div></td>
  </tr>
  <tr>
    <td height="45"><div align="center" class="STYLE1"><a href="edit.php?type=user_email">修改邮箱</a></div></td>
  </tr>
  <tr>
    <td height="49"><div align="center" class="STYLE1"><a href="edit.php?type=user_tel">修改电话</a></div></td>
  </tr>
  <tr>
    <td><div align="center" class="STYLE1"><a href="edit.php?type=user_photo">修改照片</a></div></td>
    <td width="366">&nbsp;</td>
  </tr>
  <tr>
    <td height="39"><div align="center" class="STYLE1"><a href="out.php">退出登陆</a></div></td>
    <td width="366">&nbsp;</td>
  </tr>
</table>
<?php
}
;?>
        
<?php
mysql_free_result($Recordset1);
?>

</div>
</div></div>
	<div id="bottomDiv"></div>
</div>
<script language="javascript">
$("#test1").toggle(function(){$("#test").slideDown()},function(){$("#test").slideUp()})
</script>
</HTML>